package com.oa.core.utils.request;

import com.baomidou.mybatisplus.plugins.Page;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public abstract class RParam {
    private Integer pageNum;

    private Integer pageSize;

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Page getPage() {
        return new Page<>(this.getPageNum(), this.getPageSize());
    }

    public abstract String getString(String key);

    public Integer getInteger(String key) {
        return Integer.valueOf(this.getString(key));
    }

    public Double getDouble(String key) {
        return Double.valueOf(this.getString(key));
    }

    public Boolean getBoolean(String key) {
        return Boolean.getBoolean(this.getString(key));
    }

    public abstract boolean paramExist(String ... key);
}
